User Interface


Cult3D Designer User Interface

figure 1—Work Area

The Cult3D Designer main work area consists of six different subwindows: Event Map, Scene Graph, Preview, Actions, Object Properties and Events.

Event Map

figure 2—Options Menu
Events specify the input that triggers or drives the actions in the scene. For every event there is an options menu that can be popped up with a right-click on the respective event. (See figure 2.)

The options menu lists the settings for the event:

Initial Activation Events can be either active or inactive. An inactive event can not be triggered until it has been activated by an Activate Event action. If Initial Activation is checked, then the event is active. If the action is not checked, then you need to activate the event before it can be triggered.
Automatic Reset

Events can only be triggered when they are in the reset state. All events start out reset, but once triggered they must be reset before they can be triggered again. You can either do an explicit reset with a Reset Event action, or you can set it to automatically reset after it has been triggered by checking the Automatic Reset option in this menu.

Example 1: Attach a Left Mouse Button event to an object. Unless Automatic Reset is activated (or the event is explicitly reset with a Reset Event action) the end-user will only be able to trigger it once by clicking.

Example 2: If you set a Timer event to trigger a System Beep action after 2000ms, and enable Automatic Reset, then the beep will sound every 2 seconds.

Change Name Changes the name of the event.
Collapse Inputs Collapses the tree of objects and actions to one icon.
Delete Deletes the event.

Event Types
World Start
Triggered when the scene loads.
World Stop
Occurs when you quit the scene, i.e., load another scene.
World Step
Gets triggered every time that the scene gets rendered, which normally happens about 30 or 15 times per second. All this depends on the users computer and the scene/object running. If for instance the object is small and uses very few polygons, then this event can get triggered up to 200 times per second. This event is useful to call Java actions which have real time constraints or things that should continously happen.
Timer

The event is triggered after an author definable duration. By double-clicking the timer icon you can change the delay.

The animation system continuously deals with CPU breakdowns, peak conditions, system bottlenecks, etc. In such a situation, timer events can not be 100% accurate. Since timer events are managed from inside the animation system pipe (which is basically a loop of functional modules), triggering may be slightly postponed.

As all other objects, timer events are managed in the same sequence in which they were created. Example: If you create two timer events—first Timer1 and then Timer2—and you set both of them to 1000 ms, then Timer1 will always trigger before Timer2. The triggering code is executed simultaneously for all the events: Timer2 will never overflow and overlap with Timer1. Now, if you bind Translation actions to each of those two timers and connect both translations to the same object, it is possible that the two translation actions accumulate different relative delays during their execution. In that case, you may see strange overlapping behaviors of the two translations. This is not due specifically to the use of timer events or how they are queued, but could obviously occur whenever two different actions affect the same object at the same time.

[Left, Middle, Right] Mouse Button Pressed

The end-user pressed the specified mouse button on the object associated with this event. By selecting the left, middle, or right event type, you can choose to trigger on the left, middle or right mouse button.

Normally, Windows users have a two-button mouse (left and right), while Macintosh users use a one-button mouse (left). Macintosh users can use the control key to simulate the right mouse button.

Keyboard Button Pressed
This event occurs when the end-user presses the specified key on the object associated with the event. By double-clicking the Keyboard Button Pressed event, you can define which keys or sequences of keys that should trigger the event.
Keyboard Button Released
Works like the Keyboard Button Pressed event, but activates only when the end-user has released the key specified. By double-clicking the Keyboard Button Released event, you can define which keys or sequences of keys that should trigger the event.
Object Motion Completion
An object motion action has been completed.
Sound Completion
A sound action has been completed.
Manual
This event is what one would call a "dummy" event. The only time it gets triggered is if another event triggers it.

Scene Graph

The Scene Graph window shows a hierarchical view of the data associated with objects and cameras. You can use the Scene Graph to drag object icons to the Event Map in order to define new interactions.

Preview Window

figure 3

Everything that is done to the object and scene is shown in this window. Here you can try out the scene, just as the end-user will do in a browser window. The Preview window is fully interactive and you can even left-click an object in the scene, and have that object highlighted in the Scene Graph. You can also drag an object directly from the Preview window to the Event Map (by holding down the control key while left-dragging the object). The result is a rendered icon of the object in the Event Map, thus making it much easier to set up complex event maps.


The toolbar functions and the manipulations of the object performed in the Preview window have no effect on the resulting presentation.

They are only there to assist in the creation of the presentation and to allow the author to see all details of the object and the scene. The preview does not have to be running to rotate, translate, and zoom; it suffices that the third toolbar button (Toggle Select vs. Rotate-Zoom-Translate) is pressed.

The toolbar in the Preview window has four different buttons.

Actions

With Cult3D Designer, you get some pre-made actions. With these you can control your scene and object to your desire. You connect an action to an event, and then connect the selected data (i.e. object, sound, etc.) to the action you want the data to perform.
Object Motion Actions
figure 4

Play Motion
If there is animation data for the selected object, this action starts the animation. Double-clicking the action icon in the Event Map opens the dialog in figure 4, where you can adjust the following parameters:

  • Transition Time
    Defines the duration of the object's animation.
  • Motion
    Lets the author choose between submotions, which are defined by right-clicking the object in the Event Map and selecting Edit Motion Keyframes from the popup menu. This lets you split complex animations into a set of named submotions. Then, when you perform the Play Motion action, you can select the submotion to use.
    Example: An object has an animation consisting of two parts—walk and run—for a total of 200 frames. The walk cycle is stored in frames 0 through 99 and the run cycle in the remaining frames from 100 to 199. It greatly simplifies setting up actions if you split the total sequence of 200 frames into two named submotions (for example, "walk" and "run"). Then each can be used without knowledge of the exact range of frames used by the respective submotions.
  • Keyframes
    Specifies starting and ending keyframes for an animation. This is useful when assembling more complex animations.
  • Time
    Defines the duration of the animation. You can either use the original imported duration, or override it with a new value.
  • Direction Control
    Selects the way repeating actions repeat. When the Oscillate option is checked the motion reverses when it gets to the end rather than just restarting from the beginning.
  • Iteration
    With the Loop checked, the animation is played over and over. If Repeat is checked, you explicitly set the number of times the animation will repeat before stopping.

When Apply to Children is checked, the above definitions will apply to all objects downwards in the object hierarchy.

figure 5

Goto Motion
Jumps directly to a desired position in the animation. When setting the Transition Time to be greater than 0, the object will morph between the current position and the new position during the specified timespan.

Stop Motion
Stops the playing of the selected object.

Figure 6

Translate
Moves the selected object to a new position. With the sliders, you select a new position for the object, or you can type the new x, y, and z values directly into the provided fields. The Performance duration field lets you set the duration of the translation in milliseconds (ms). (For example, to make a move take 5 seconds, set the Performance duration to 5000.) If Loop is checked, then the translation is repeated.

Figure 7

Rotate
Rotates the selected object.

Stop Translate
Stops the movements of the selected object.

Stop Rotation
Stops the rotation of the selected object.

Figure 8

Sequence
Adds a timeline based sequence to the selected object. In the dialog (see figure 8) you can view the actions associated with the sequence. If Blocking is checked, each action is performed and completed before the next one is started. If Blocking is not checked, all specified actions are started at the same time.

Stop Sequence
Stops the sequence of the selected object.

Figure 9

Bind Arcball
Lets the end-user manipulate the object directly. The dialog specifies which mouse button does what (i.e., which one does translation, rotation, or zoom respectively). Rotation is relative to the object's pivot point. (See figure 9.)

Reset
Stops any animation in progress and resets the object to its original translation, rotation, and zoom values.


Camera Actions

Select Camera                                                     
Selects a camera for the scene.

Stereoscopic features                                                 
Selects a camera for the scene but with the option to add stereoscopic rendering from the selected camera


Sound Actions
System Beep
Plays a system beep.

Play Sound
Plays a sound as defined by a sound resource (sample, MIDI, etc.) To select a sound resource, use the menu View:Sounds.

Figure 10
figure 11

Under Windows, it is currently only possible to play one sound and one MIDI song at the same time. (Unless you have more than one sound board, properly installed and configured in an MCI compatible way. Since MIDI tracks are also played using MCI, they are subjected to all the above restrictions.)

Stop Sound
Stops the playing of the selected sound resource.


Connection Actions

Load URL
Double-click the action icon to enter URL destination and target. The URL specifies what to load and the (optional) target field allows you to specify what frame to load the URL into.

Example: If you want the same effect as when activating the HTML link:

<A TARGET="main" HREF="http://www.cult3d.com">

you would enter "http://www.cult3d.com" in the URL field and "main" in the target field.

Load Cult3D File
Double-click the action icon to enter the destination where you can load a Cult3D Player file [*.co].


Event Actions

Trigger Event
The Trigger Event action lets you trigger any event at any time. For example, if you trigger a Timer Event, it is as if you suddenly forced that event's clock to the ending value, thus causing any actions which the Timer Event is associated with to run immediately. Events of type Manual can only be triggered by a Trigger Event action.

Reset Event
Events can only be triggered when they are in the reset state. All events start out reset, but once triggered they must be reset before they can be triggered again. You can either do an explicit reset with a Reset Event action, or you can set it to automatically reset after it triggers, by checking the Automatic Reset option in the event popup menu in the Event Map (right-click the event to show it).

Example: Attach a Left Mouse Button event to an object. Unless it is explicitly reset with a Reset Event action (or the event has Automatic Reset activated) the end-user will only be able to trigger it once by clicking.

Activate Event
Events can be either active or inactive. An inactive event can not be triggered until it has been activated by an Activate Event action. If Initial Activation is checked, then the event is active. If it is not checked, then you need to activate the event before it can be triggered.

Example: Create a Timer Event with a duration of 60000ms (1 minute). Have the Timer Event trigger a System Beep action. Use the popup menu in the Event Map to make the event inactive by default. Then bind an Activate Event action to the left-click of some object and have it activate the Timer Event. When the end-user left-clicks the object, the Activate Event will activate the Timer Event. One minute later the Timer Event will trigger the System Beep action and the user will hear a beep.

Deactivate Event
This action deactivates an event, which allows you to disable other events. (See the example under Activate Event for a discussion of how to use the activation state of an event.)

Toggle Event Activation
Toggles the activation state of an event. If the event is already active, the Toggle Event Activation action deactivates it. If the event is not active, it gets activated.

Render Actions

Set Background Color
Sets the background to a new definable color.

Hide Object
Hides the connected object from the viewer.

Unhide Object
If the object was hidden, the object becomes visible.

Bilinear Filtering Toggle
Toggles the bilinear textures filter on or off for all textures in the scene.


Expression Actions
figure 12—Expression Icon
Execute Expression
The Execute Expression action is used to execute the attached expression. (Expressions are accessed by dragging an expression from the Expression window, figure 17, to the Event Map.) The icon for an expression looks like figure 12.

The Execute Expression action itself is represented by the icon:

figure 13—Conditional Test Dialog

Conditional Test
The dialog specifying the Conditional Test action can be seen in figure 13, and the icon representing the Conditional Test action looks like this:
You connect other actions on either the True or False side of the Conditional Test action. You then use the Conditional Test action dialog to specify the details of the test.

The action needs a property to test. To point the action to a property, drag the property from the Object Property window for the object that owns the property to be tested, and drop it on the Conditional Test icon ().
In the dialog you can specify the exact condition to test and any comparison values needed. It is even possible to compare two different object properties. Simply drag the specific object property from the Object Properties window and release it in the Compare with edit box.

Object Properties

figure 14—Object Properties
Object properties allows you to store data used by your presentation. Each object in the scene has a set of properties associated with it.

By opening the Object Properties window and selecting an object, you can view the list of properties currently bound to the object. (See figure 14.) The window shows three columns, one each for name, initial value, and data type.

The properties ISBN, EAN, and Greenwich price (a currency neutral "standardized" price) are present here in preparation for a future e-commerce application.

Every ordinary object comes with a set of seven initial properties. (Compare the first seven properties seen in figure 14Name, Translation, Rotation, Transform, ISBN, EAN, and Greenwich price.) These are system properties and can not be removed from the object. Camera objects have only four system properties: Name, Translation, Rotation, and Transform.

Figure 15—Add Property
figure 16—Cast a Property Element

In addition to the provided system properties, you can add user properties. (Such as the "Counter" property shown in figure 14.) Press the button in the Object Properties window to open the Add property dialog (figure 15). Each added user property must be given a unique name.

The name must be 7 bit ASCII and must not contain the following special characters: period (.), minus (-), plus (+), asterisk (*), left and right parenthesis (()), colon (:), and slash (/), since these will confuse the expression parser.

By selecting a property and pressing the button you can access an individual component of another property. (Ps for sub-property.) For example, if you want to access the y component of the object's Rotation property, you select Rotation and press . This brings up the Add Property dialog so you can give the new sub-property a name and a type (in this case, let's choose the name "Rotation_Y" and the type Float or Integer). When you click the Add button, a second dialog (figure 16) shows to let you specify what component of Rotation you want to attach Rotation_Y to. Click Y axis component and press OK. You will now be able to directly manipulate the y component of the Rotation property through the name Rotation_Y.

The button is not yet implemented and will always be disabled. There is currently no way of deleting a user property once it has been created. It will never be possible to delete system properties.

Expressions

figure 17—Expressions

The expression window shown in figure 17 is accessed by selecting Expressions in the Window menu.

Figure 18—Expression Editor

To create the two example expressions shown in figure 17, click on the Add button to open the Expression Editor dialog (figure 18).

Type a name for the new expression—in this example, let's call it "Add Click Counter". To write the actual expression, drag object properties (from various Object Properties windows) into the large text box in the middle of the Expression Editor dialog. In this example we dragged the the "Counter" property from the Object Properties window of the object "MorphBall".

To increment the "Counter" property we first add the text "+1" after the name of the property, and then drag the "Counter" property from the Object Properties window of the object "MorphBall" into the destination box. This way, when the expression executes it will first retrive the "Counter" property from the "MorphBall" object, add one to it, and then store it back in the same "Counter" property in the same "MorphBall" object. Thus the counter will be incremented by one.

Figure 19—Example

Once the Expression Editor has been used to create the "Add Click Counter" expression, the Execute Expression action that uses it can be created. (An expression by itself doesn't do anything, it is the triggering of an Exacute Expression action pointing to the expression that causes the expression to be evaluated and the result saved in the destination property.)

To create the Execute Expression action, drag the expression (in this case "Add Click Counter") into the Event Map window. An Execute Expression action will be created and linked to the expression. See figure 19.

The example in figure 19 detects when the user clicks the left mouse button on the MorphBall object. This triggers the Execute Expression action that in turn executes the "Add Click Counter" expression.

Figure 20—Example

A function like the one just described in figure 19 could, for instance, be used as shown in figure 20. It does not play the animation until the user has left-clicked the MorphBall object three times. When the animation starts, it also resets the counter back to zero.

In order for this to work, the value of the object property "Counter" needs to be tested, and for that the Conditional Test action is used.

Events

Figure 21—Events

Here are all events in the scene displayed, for another view of your created scene criteria. This lets you manipulate exixting events to, for instance, change their types. This is much quicker than deleting the old event, creating a new one to take its place, and finally to reconnect all the connections.

If for instance want to change an event type, you can easily do it here, instead of removing the old event with all it's connections, and then create the new one and connect the old connections to the new one.

Copyright ⌐ 1998-1999 Cycore Computers AB, All Rights Reserved